#include "PauseMenuWidget.h"
#include "ui_PauseMenuWidget.h"

PauseMenuWidget::PauseMenuWidget(QWidget *parent)
    : QWidget(parent)
    , ui(new Ui::PauseMenuWidget)
{
    ui->setupUi(this);

    ui->titleLabel->setText("pause");
    this->setAutoFillBackground(true);           // 启用自动填充背景
    this->setAttribute(Qt::WA_StyledBackground); // 确保样式表应用到背景


    connect(ui->resumeButton,&QPushButton::clicked,this,&PauseMenuWidget::resumeGame);
    connect(ui->mainMenuButton,&QPushButton::clicked,this,&PauseMenuWidget::returnMainMenu);
}

PauseMenuWidget::~PauseMenuWidget()
{
    delete ui;
}
